Skip to content

Conversation

@AmoghDeshmukh
Copy link

@AmoghDeshmukh AmoghDeshmukh commented Jan 2, 2026

A new directory was created at faker/providers/es_PE/ to house the following new provider modules:

  1. Provider Implementation
    address: Generates realistic Peruvian addresses, including departments, cities, and correctly formatted postal codes.
    automotive: Creates Peruvian vehicle license plates, supporting both the modern (LLL-NNN) and previous (LL-NNNN) formats.
    bank: Provides Peruvian banking data, including 20-digit Interbank Account Codes (CCI) and names of major local banks.
    company: Generates Peruvian company names with appropriate legal suffixes (e.g., S.A.C., E.I.R.L.).
    internet: Localizes internet data, ensuring generated email addresses and domains use the .pe top-level domain.
    person: Provides common Peruvian first names and last names, including some of indigenous origin, by extending the base Spanish provider.
    phone_number: Generates valid phone numbers with formats for mobile phones and landlines (both for Lima and other provinces).
    ssn: Creates Peruvian national identification numbers, including the 8-digit DNI (national identity document) and the 11-digit RUC (taxpayer registry number) with a valid check-digit calculation.
    color, currency, date_time, job: These providers were added by inheriting directly from the existing es_ES locale, as their data is largely identical.

  2. Testing
    tests/providers/test_es_PE.py: A new test file was created to validate all the custom es_PE providers. It includes specific tests for the formats and logic of addresses, license plates, bank accounts, phone numbers, DNI, and RUC, ensuring the generated data is accurate and conforms to Peruvian standards. It also includes basic checks for the cloned providers.

closes #2301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add es_PE providers

1 participant